<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://displaytag.sf.net" prefix="display"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="s"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://www.springframework.org/security/tags" prefix="ss"%>

<jsp:include page="../header.jsp" />
<div id="content">
	<div id="topstory" class="box">
		<h1>
			<fmt:message key="author.list.title" />
		</h1>
	</div>
	<div class="padding">
		<div id="dialog-confirm" title="Empty the recycle bin?" style="display: none;">
			<p>
				<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>This item will be permanently deleted and cannot be recovered. Are you
				sure?
			</p>
		</div>
		<c:if test="${not empty message}">
			<div class="ui-widget">
				<div class="ui-state-highlight ui-corner-all" style="margin-top: 20px; padding: 0 .7em;">
					<p>
						<span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span> <strong>Info !</strong>
						<c:out value="${message }" />
					</p>
				</div>
			</div>
		</c:if>
		<div>
			<form:form action="/isLibrary/authors/find.do" commandName="authorView" method="POST" >
				<table border="0" cellspacing="5" cellpadding="0" width="100%" class="formTable tplBorder">
					<tr>
						<td width="15%"></td>
						<td width="35%"></td>
						<td width="15%"></td>
						<td width="35%"></td>
					</tr>
					<tr>
						<td class="label"><fmt:message key="author.name" /></td>
						<td><form:input path="jmeno" /> <form:errors path="jmeno" cssStyle="color: red;" /></td>
						<td class="label"><fmt:message key="author.surname" /></td>
						<td><form:input path="prijmeni" /> <form:errors path="prijmeni" cssStyle="color: red;" /></td>
					</tr>
					<tr>
						<td colspan="2"><input type="submit" /></td>
					</tr>
				</table>
			</form:form>
		</div>
		<h2></h2>
		<display:table export="true" id="data" name="autorList" requestURI="/authors.do" decorator="cz.boxdesign.library.web.decorator.AutorTableDecorator"
			pagesize="10">
			<ss:authorize access="hasRole('ROLE_ADMIN')">
				<display:column property="editUrl" titleKey="common.edit" sortable="false" />
				<display:column property="deleteUrl" titleKey="common.delete" sortable="false" />
			</ss:authorize>
			<display:column property="showUrl" titleKey="common.show" sortable="false" />
			<display:column property="jmeno" titleKey="author.name" sortable="true" />
			<display:column property="prijmeni" titleKey="author.surname" sortable="true" />
		</display:table>
	</div>
	<!-- /padding -->
</div>
<!-- /content -->
<jsp:include page="side-menu.jsp" />
<jsp:include page="../foother.jsp" />
